package com.lkwlw.tplms.system.action;

import com.lkwlw.tplms.system.dao.mapper.AdmininfoMapper;
import com.lkwlw.tplms.system.dao.model.Admininfo;
import com.opensymphony.xwork2.ActionSupport;

public class ModifyUserAction extends ActionSupport {
	private static final long serialVersionUID = 9208433485243681697L;
	
	private Admininfo admininfo;
	
	private Integer id;
	
	private AdmininfoMapper admininfoMapper;
	
    private String username;
	
	private Integer accountType;
	
	private String fullName;
	
	private String area;
	
	private String phone;
	
	private String addre;
	
	private String job;
	
	private String cardNo;
	
	private String remark;
	
	private String email;
	
	
	public String execute(){
		
		admininfo = admininfoMapper.selectByPrimaryKey(id);
		id= admininfo.getId();
		
		return SUCCESS;
	}
	public String modifyUser(){
		Admininfo admin = new Admininfo();
		admin.setUsername(username);
		admin.setId(id);
		admin.setAccountType(accountType);
		admin.setAddre(addre);
		admin.setArea(area);
		admin.setCardNo(cardNo);
		admin.setEmail(email);
		admin.setFullName(fullName);
		admin.setJob(job);
		admin.setPhone(phone);
		admin.setRemark(remark);
		admininfoMapper.updateByPrimaryKeySelective(admin);
		return SUCCESS;
	}

	public Admininfo getAdmininfo() {
		return admininfo;
	}


	public void setAdmininfoMapper(AdmininfoMapper admininfoMapper) {
		this.admininfoMapper = admininfoMapper;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public void setAccountType(Integer accountType) {
		this.accountType = accountType;
	}
	public void setFullName(String fullName) {
		this.fullName = fullName;
	}
	public void setArea(String area) {
		this.area = area;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public void setAddre(String addre) {
		this.addre = addre;
	}
	public void setJob(String job) {
		this.job = job;
	}
	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	

	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}

}
